#include <catch2/catch.hpp>

#include "solution.hpp"

using namespace solution_005;

TEST_CASE("5. Longest Palindromic Substring", "[005]") {

CHECK(Solution().longestPalindrome("babad") == "bab");
CHECK(Solution().longestPalindrome("cbbd")  == "bb");
CHECK(Solution().longestPalindrome("a")     == "a");
CHECK(Solution().longestPalindrome("ac")    == "a");
CHECK(Solution().longestPalindrome("ccc")   == "ccc");

CHECK(Solution().longestPalindrome2("babad") == "bab");
CHECK(Solution().longestPalindrome2("cbbd")  == "bb");
CHECK(Solution().longestPalindrome2("a")     == "a");
CHECK(Solution().longestPalindrome2("ac")    == "a");
CHECK(Solution().longestPalindrome2("ccc")   == "ccc");

}
